﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RenderHeads.Media.AVProVideo;

public class dplayDemo : MonoBehaviour
{

    public MediaPlayer p1,p2;
    public Renderer plane;

    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(test(3f));
    }

    IEnumerator test(float delay)
    {
        yield return new WaitForSeconds(delay);
        plane.material.SetTexture("_Mask",p1.TextureProducer.GetTexture());
        plane.material.SetTexture("_MainTex",p2.TextureProducer.GetTexture());
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
